<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="/static/css/admin/style_new2019.css" rel="stylesheet"/>
	<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<title><?php echo L('website_manage');?></title>
	<script>
	var URL = '/index.php/Admin/Exam';
	var SELF = '/index.php?m=Admin&amp;c=exam&amp;a=work&amp;menuid=489';
	var PAGE = '/index.php?m=Admin&amp;c=exam&amp;a=work&amp;menuid=489';
	var ROOT_PATH = '';
	var APP	 =	 '/index.php';
	//语言项目
	var lang = new Object();
	lang.connecting_please_wait = "请稍后...";
	lang.confirm_title = "提示消息";
	lang.move = "移动";
	lang.title_empty = "请输入宝贝名称";
	lang.iid_empty = "IID不能为空";
	lang.dialog_title = "消息";
	lang.dialog_ok = "确定";
	lang.dialog_cancel = "取消";
	lang.please_input = "请输入";
	lang.please_select = "请选择";
	lang.not_select = "不选择";
	lang.all = "所有";
	lang.input_right = "输入正确";
	lang.plsease_select_rows = "请选择要操作的项目！";
	lang.upload = "上传";lang.uploading = "上传中";
	lang.upload_type_error = "不允许上传的文件类型！";
	lang.upload_size_error = "文件大小不能超过{sizeLimit}！";
	lang.upload_minsize_error = "文件大小不能小于{minSizeLimit}！";
	lang.upload_empty_error = "文件为空，请重新选择！";
	lang.upload_nofile_error = "没有选择要上传的文件！";
	lang.upload_onLeave = "正在上传文件，离开此页将取消上传！";
	lang.menu_name="菜单名称";
	lang.module_name="模块名";
	lang.action_name="方法名";
	</script>
</head>

<body>

<div id="J_ajax_loading" class="ajax_loading"><?php echo L('ajax_loading');?></div>
<div style="height: 20px;width: 100%"></div>
<?php if(($sub_menu != '') OR ($big_menu != '')): ?><div class="subnav">
    <div class="content_menu ib_a blue line_x">
    	<?php if(!empty($big_menu)): ?><a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo ($big_menu["iframe"]); ?>" data-title="<?php echo ($big_menu["title"]); ?>" data-id="<?php echo ($big_menu["id"]); ?>" data-width="<?php echo ($big_menu["width"]); ?>" data-height="<?php echo ($big_menu["height"]); ?>"><em><?php echo ($big_menu["title"]); ?></em></a>　<?php endif; ?>
        <?php if(!empty($sub_menu)): if(is_array($sub_menu)): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key; if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo U($val['module_name'].'/'.$val['action_name'],array('menuid'=>$menuid)); echo ($val["data"]); ?>" class="<?php echo ($val["class"]); ?>"><em><?php echo ($val['name']); ?></em></a><?php endforeach; endif; else: echo "" ;endif; endif; ?>
    </div>
</div><?php endif; ?>
<!--栏目列表-->
<div class="pad_lr_10">
    <div style="font-size: 32px;font-weight: bold;line-height: 45px;text-align: center;margin-top: 10px;">考试中心</div>
    <div style="font-size: 15px;font-weight: bold;line-height: 30px;text-align: center;margin-bottom: 30px;">总分：<?php echo ($count); ?>分</div>
    <div class="J_tablelist table_list" data-acturi="<?php echo U('Config/ajax_edit');?>">
        <form id="info_form" action="<?php echo U('exam/workaction');?>" method="post">
            <table width="100%" cellspacing="0" id="J_cate_tree">
                <tbody>
                <?php if(is_array($list)): foreach($list as $key=>$item): ?><tr>
                        <td style="background: #f3e7e3;padding-left: 30px;">
                    <span style="color: #3f913f;font-weight: bold;">(<?php if($item['type'] == 'radio'): ?>单选
                        <?php else: ?>多选<?php endif; ?> <?php echo ($item["score"]); ?>分题 )</span>
                            <?php echo ($item["name"]); ?>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 30px;">
                            <?php if(is_array($item["content"])): foreach($item["content"] as $key_child=>$item_child): ?><div style="display: inline-block;margin-right: 50px;">
                                    <?php if($item['type'] == 'radio'): ?><input type="radio" value="<?php echo ($key_child); ?>" name="answer[<?php echo ($item['id']); ?>][]" >
                                        <?php else: ?>
                                        <input type="checkbox" value="<?php echo ($key_child); ?>" name="answer[<?php echo ($item['id']); ?>][]"><?php endif; ?>
                                    <?php echo ($zimu_arr[$key_child]); ?>：<?php echo ($item_child); ?>
                                </div><?php endforeach; endif; ?>
                        </td>
                    </tr><?php endforeach; endif; ?>
                </tbody>
            </table>

            <div class="content_menu ib_a blue" style="text-align: center;margin-top: 30px;">
                <button type="submit" style="padding: 10px;font-size: 17px;background: #6f75b0;color: #ffffff;" class="add fb" ><em>提交试卷（提交后将直接进行打分）</em></button>
            </div>

        </form>
    </div>
</div>
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/jquery/plugins/jquery.tools.min.js"></script>
<script src="/static/js/jquery/plugins/formvalidator.js"></script>
<script src="/static/js/yhxia.js"></script>
<script src="/static/js/admin.js"></script>
<script src="/static/js/dialog.js"></script>
<script>
//初始化弹窗   errNum   retData    errMsg
(function (d) {
    d['okValue'] = lang.dialog_ok;
    d['cancelValue'] = lang.dialog_cancel;
    d['title'] = lang.dialog_title;
})($.dialog.defaults);
</script>

<?php if(isset($list_table)): ?><script src="/static/js/jquery/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script><?php endif; ?>
<script src="/static/js/jquery/plugins/jquery.treetable.js"></script>
<script>
    $(function(){
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $('#info_form').ajaxForm({success:complate,dataType:'json'});
        function complate(result){
            if(result.errNum === 0){
                window.location.href="<?php echo U('exam/examdetail');?>?user_id="+result.retData.user_id+"&time=0000"+result.retData.time;
            } else {
                $.yhxia.tip({content:result.errMsg, icon:'alert'});
            }
        }
    });
</script>
</body>
</html>